using System.Collections;
using Rdl;

namespace GTame.ReportParser
{

    public class DataSetReferenceType
    {

        private string _DataSetName;
        private string _LabelField;
        private string _ValueField;

        public string DataSetName
        {
            get
            {
                return _DataSetName;
            }
            set
            {
                _DataSetName = value;
            }
        }

        public string LabelField
        {
            get
            {
                return _LabelField;
            }
            set
            {
                _LabelField = value;
            }
        }

        public string ValueField
        {
            get
            {
                return _ValueField;
            }
            set
            {
                _ValueField = value;
            }
        }

        public DataSetReferenceType()
        {
        }

        public Rdl.DataSetReferenceType Write()
        {
            Rdl.DataSetReferenceType dataSetReferenceType = new Rdl.DataSetReferenceType();
            System.Collections.ArrayList arrayList1 = new System.Collections.ArrayList();
            System.Collections.ArrayList arrayList2 = new System.Collections.ArrayList();
            if (_DataSetName != null)
            {
                arrayList1.Add(_DataSetName);
                arrayList2.Add(1);
            }
            if (_LabelField != null)
            {
                arrayList1.Add(_LabelField);
                arrayList2.Add(2);
            }
            if (_ValueField != null)
            {
                arrayList1.Add(_ValueField);
                arrayList2.Add(3);
            }
            dataSetReferenceType.Items = arrayList1.ToArray();
            dataSetReferenceType.ItemsElementName = (Rdl.ItemsChoiceType31[])arrayList2.ToArray(typeof(Rdl.ItemsChoiceType31));
            arrayList2 = arrayList1 = null;
            return dataSetReferenceType;
        }

    } // class DataSetReferenceType

}

